<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #d1{
            width:150px;
            height:150px;
            border:1px solid #000;
            background: #EDB21C;
        }
    </style>
</head>
<body>
    <div id="d1">

    </div>
    <br>
    <button onclick="changeDiv()">点我一下</button>
</body>
<script>
    function changeDiv(){
        var obj = document.getElementById("d1")
        obj.style.width = "400px";
        obj.style.height = "400px"
        obj.style.background = "pink"
    }
</script>
</html>